import {baseUrl} from "@/config/env";
import startSearchModel from "@/config/startSearchModel";

export default () => {
    return {
        index: true,
        submitText: '修改',
        size: 'default',
        labelWidth: 120,
        menuAlign: 'center',
        menuPosition: "right",
        menuType: 'text',
        searchIndex: 2,
        searchMenuSpan: 6,
        searchIcon: true,
        addBtn: false,
        delBtn: false,
        editBtn: false,
        column: [
            {
                label: '任务id',
                span: 12,
                prop: 'id',
                hide: true,
            },
            {
                label: '流程类别',
                prop: 'procDefCategory',
                span: 24,
                type: "select",
                dicUrl: `${baseUrl}/startActCategoryApi/listCategory`,
                props: {
                    label: 'actCategoryName',
                    value: 'actCategoryCode',
                },
                rules: [{
                    required: true,
                    trigger: "blur"
                }]
            },
            {
                label: '流程名称',
                prop: 'procDefName',
                span: 12,
                search: true,
                searchMode: startSearchModel.LIKE_RIGHT,
            },
            {
                label: '任务定义key',
                prop: 'taskDefinitionKey',
                span: 12,
                hide: true,
            },
            {
                label: '任务名称',
                prop: 'curTaskDefName',
                span: 12,
                search: true,
                searchMode: startSearchModel.LIKE_RIGHT,
                rules: [{
                    required: true,
                    trigger: "blur"
                }]
            },
            {
                label: '任务类型',
                prop: 'taskType',
                span: 12,
                type: "select",
                hide: false,
                dicData: [
                    {label: "个人任务", value: "user"},
                    {label: "组任务", value: "group"},
                ]
            },
            {
                label: '申请人',
                span: 12,
                prop: 'userFinalName',
                type: "input",
                bind: "procStartUser.userFinalName"
            },
            {
                label: '任务优先级',
                prop: 'curTaskPriority',
                span: 12,
                type: "number"
            },
            {
                label: '任务创建时间',
                prop: 'createTime',
                span: 12,
                type: 'datetime',
                valueFormat: 'YYYY-MM-DD HH:mm:ss',
                format: 'YYYY-MM-DD HH:mm:ss',
                editDisplay: false,
                addDisplay: false
            },

        ]
    }
}
